import { createRouter, createWebHistory } from 'vue-router'

const routes = [
	{
		path: '/login',
		name: 'login',
		component: () => import('@/views/Login/index.vue')
	},
	{
		path: '/',
		component: () => import('@/views/Layout/index.vue'),
		redirect: '/message',
		children: [
			{
				path: 'message',
				name: 'message',
				meta: {
					isLogin: true
				},
				component: () => import('@/views/Layout/Message/index.vue')
			},
			{
				// 好友列表
				path: 'contact',
				name: 'contact',
				meta: {
					isLogin: true
				},
				component: () => import('@/views/Layout/Contact/index.vue')
			}
		]
	},
	{
		path: '/video',
		name: 'video',
		component: () => import('@/views/Video/index.vue')
	}
]
const router = createRouter({
	history: createWebHistory(),
	routes
})

export default router
